﻿@{
    ViewBag.Title = "Home Page";
}
@section scripts
{
    <script> var sUrl = "@Url.Content("~/tfsevent")"; </script>
    <script src="~/Scripts/jquery.signalR-2.0.1.min.js" type="text/javascript"></script>
    <script src="~/Scripts/Index.js" type="text/javascript"></script>
}
<div class="row">
    <div class="col-md-8">
        <div class="jumbotron">
            <h2>NotifyPilot</h2>
            <p class="lead">NotifyPilot is a simple bridge between TFS and a group of clients (eg : Yammer, SignalR, ect..).</p>
            <p><a href="https://notifypilot.codeplex.com/" target="_blank" class="btn btn-default btn-primary btn-lg">Learn more &raquo;</a></p>
        </div>
        <div class="col-md-6">
            <h6>Service Configuration</h6>
            <p class="text-muted">
                Set the parameters of NotifyPilot
            </p>
            <p>@Html.ActionLink("Config", "ServicesConfig", "Config", null, new { @class = "btn btn-warning" })</p>
        </div>
        <div class="col-md-6">
            <h6>Yammer Configuration</h6>
            <p class="text-muted">Authorize NotifyPilot to interact with Yammer</p>
            <p>@Html.ActionLink("Config", "Yammer", "Config", null, new { @class = "btn btn-warning" })</p>
            @if (!ViewBag.isConfig)
            {
                <div class="alert alert-warning">You should configure your Yammer Parameters</div>
            }
        </div>
    </div>
    <div class="col-md-4">
        <h6>Test buttons</h6>
        <div class="btn-group btn-group-justified">
            <button id="wi" type="button" class="btn btn-info">WorkItem</button>
            <button id="cs" type="button" class="btn btn-info">ChangeSet</button>
            <button id="bl" type="button" class="btn btn-info">Build</button>
        </div>
        <h5>Feeds</h5>
        <div id="messages"></div>
        <div id="eventsList" class="list-group">
        </div>
    </div>
</div>
<script id="eventListTemplate" type="text/x-jsrender">
    <a href="#" class="list-group-item">
        <h6 class="list-group-item-heading">{{:WorkItemType}} #{{:ID}}</h6>
        <p class="list-group-item-text text-warning">{{:ProjectName}}</p>
        <small class="list-group-item-text">Changed by {{:ChangedBy}}</small>

    </a>
</script>